package com.wutianyi.jackson.annotation;

import org.codehaus.jackson.annotate.JsonSubTypes;
import org.codehaus.jackson.annotate.JsonSubTypes.Type;
import org.codehaus.jackson.annotate.JsonTypeInfo;

@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
@JsonSubTypes(
{ @Type(value = Cat.class, name = "cat"), @Type(value = Dog.class, name = "dog") })
public abstract class Animal
{
    public String name;
}
